package entity

import (
	"time"
)

const (
	StateCreate   State = 0 // 新建
	StateOK       State = 1 // 支付成功
	StateComplete State = 2 // 完成
	StateCancel   State = 3 // 取消
)

type (
	State int8

	Order struct {
		ID        int64
		UserID    int32
		ServerID  int32
		RoleID    int32  `gorm:"index"`
		ProductID int32  // 商品配置ID
		Price     int64  // 价格
		Diamond   int64  // 对应钻石
		State     State  `gorm:"type:smallint"` // 状态
		Detail    string // 备注
		CreatedAt time.Time
		UpdatedAt time.Time
	}
)
